﻿@model IEnumerable<VfAccountApps.Domain.Models.budget_info>
@using Telerik.Web.Mvc.UI           

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>

@(Html.Telerik().Grid(Model)
      .Name("BudgetGrid")
        .DataKeys(datakeys => datakeys.Add(k => k.budget_info_id))
            .Columns(columns =>
            {
                columns.Template(c => Html.ActionLink("Edit", "Edit", new { id = c.budget_info_id }, new { @class = "edit" }) + " | " + Html.ActionLink("Delete", "Delete", new { id = c.budget_info_id }, new { @class = "delete" }))
                    .Title("Action").Width(100);

                columns.Bound(c => c.sap_info.account_sap).Width(100).Title("Account Sap");
                columns.Bound(c => c.sap_info.sap_description).Width(200).Title("Sap Description");
                columns.Bound(c => c.date).Format("{0:dd-MMM-yy}").Width(100).Title("Date");
                columns.Bound(c => c.unit).Width(100).Title("Unit");
                columns.Bound(c => c.reference_no).Width(120).Title("Reference No");
                columns.Bound(c => c.section).Width(100).Title("Section");
                columns.Bound(c => c.description).Width(200).Title("Description");
                columns.Bound(c => c.expense_amount).Width(120).Title("Expense Amount");
                columns.Bound(c => c.remark).Width(100).Title("Remark");
                columns.Bound(c => c.entry_date).Format("{0:dd-MMM-yy}").Width(100).Title("Entry Date");
            })
      .ColumnContextMenu()
      .Groupable()
      .Filterable()
      .Pageable(x=>x.PageSize(15))
      .Sortable()
      .Scrollable(x => x.Height(500))
 )